﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

public class GongReng : MonoBehaviour
{ 
    private Animator ani;
    public event Action onHitGround;
    void Start()
    {


        ani = GetComponent<Animator>();
    } 

    public  void Play()
    {        
        Invoke("PlayAniamtion",3f);
    }

    void PlayAniamtion()
    {
        ani.SetBool("isPlay", true);
    }

    public void PlayScreamSound()
    {
        SoundManager.instance.Play("jianjiaosheng_Man");
        
    }


    /// <summary>
    /// 动画回调，落地声
    /// </summary>
    public void PlayFallDownSound()
    {
        SoundManager.instance.Play("luodigangguan");
        onHitGround();
    }



}
